<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'unit-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_code'); ?>
		<?php echo $form->textField($model,'unit_code',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'unit_code'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_name'); ?>
		<?php echo $form->textField($model,'unit_name',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'unit_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_nicename'); ?>
		<?php echo $form->textField($model,'unit_nicename',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'unit_nicename'); ?>
	</div>
	
	<?php if (!$model->isNewRecord) { ?>
	<div class="row">
		<?php echo $form->labelEx($model,'unit_admin'); ?>
		<?php echo $form->textField($model,'unit_admin',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'unit_admin'); ?>
	</div>
	<?php }?>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_email'); ?>
		<?php echo $form->textField($model,'unit_email',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'unit_email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_tel'); ?>
		<?php echo $form->textField($model,'unit_tel',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'unit_tel'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_url'); ?>
		<?php echo $form->textField($model,'unit_url',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'unit_url'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_splash'); ?>
		<?php echo $form->textField($model,'unit_splash',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'unit_splash'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_logo'); ?>
		<?php echo $form->textField($model,'unit_logo',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'unit_logo'); ?>
	</div>
	
	<?php if (!$model->isNewRecord) { ?>
	<div class="row">
		<?php echo $form->labelEx($model,'unit_status'); ?>
		<?php echo $form->textField($model,'unit_status'); ?>
		<?php echo $form->error($model,'unit_status'); ?>
	</div>
	<?php }?>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_remark'); ?>
		<?php echo $form->textField($model,'unit_remark',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'unit_remark'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->